package com.lbd.gulimall.search.vo;

import com.lbd.common.to.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * @Author: linbd
 * @Description:
 * @Date: 2023/2/25 21:10
 */
@Data
public class SearchResult {
    /**商品信息**/
    private List<SkuEsModel> products;
    /**分页信息**/
    private Integer pageNum;
    private Integer totalNum;
    private Integer totalPageNum;
    private List<Integer> pageNavs;
    /**涉及信息**/
    //涉及品牌
    private List<BrandRespVO> involveBrands;
    //涉及分类
    private List<CategoryRespVO> involveCategorys;
    //涉及属性
    private List<AttrRespVO> involveAttrs;

    //面包屑导航
    private List<NavVo> navVos;

    //记录已选择的属性ID
    private List<Long> selectedAttrIds;

    @Data
    public static class NavVo {
        //(attrs=1_微软:其他)&(attrs=5英寸:6英寸)
        private String attrName;
        private String attrValue;
        //取消了面包屑导航后需要跳转到的地址。只是存一份到页面，要用的时候用
        private String link;
    }

    @Data
    public static class BrandRespVO {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CategoryRespVO {
        private Long catalogId;
        private String catalogName;
    }

    @Data
    public static class AttrRespVO {
        private Long attrId;
        private String attrName;
        private List<String> attrValues;
    }

}
